package com.ruoyi.system.domain;

import javax.persistence.*;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;

import com.ruoyi.common.core.domain.BaseEntity;
import org.hibernate.annotations.GenericGenerator;

/**
 * 角色与组织关系信息对象 sys_role_org
 *
 * @author youde
 * @date 2022-11-16
 */
@Entity
@Table(name = "sys_role_org")
@GenericGenerator(name = "uuid2", strategy = "com.ruoyi.common.utils.IDUtils")
public class SysRoleOrg extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @Column(nullable = false, length = 19, columnDefinition = "char")
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "uuid2")
    private String roleOrgId;

    /**
     * 角色id
     */
    @Excel(name = "角色id")
    @Column(nullable = false, length = 19, columnDefinition = "char")
    private String roleId;

    /**
     * 组织id
     */
    @Excel(name = "组织id")
    @Column(nullable = false, length = 19, columnDefinition = "char")
    private String orgId;

    /**
     * 组织类型
     */
    @Excel(name = "组织类型")
    @Column(columnDefinition = "char(1)")
    private String orgType;

    /**
     * 组织类型
     */
    @Excel(name = "组织所属公司")
    @Column(columnDefinition = "char(19)")
    private String pkCorp;


    public void setRoleOrgId(String roleOrgId) {
        this.roleOrgId = roleOrgId;
    }

    public String getRoleOrgId() {
        return roleOrgId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgType(String orgType) {
        this.orgType = orgType;
    }

    public String getOrgType() {
        return orgType;
    }

    public String getPkCorp() {
        return pkCorp;
    }

    public void setPkCorp(String pkCorp) {
        this.pkCorp = pkCorp;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("roleOrgId", getRoleOrgId())
                .append("roleId", getRoleId())
                .append("orgId", getOrgId())
                .append("orgType", getOrgType())
                .append("pkCorp", getPkCorp())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}